package dao.impl;

import java.util.Properties;

import javax.sql.DataSource;

import org.apache.commons.dbutils.QueryRunner;

import com.alibaba.druid.pool.DruidDataSourceFactory;

public class BaseDao {
	public static QueryRunner query=null;
	static {
		try {
			Properties properties=new Properties();
			properties.load(BaseDao.class.getResource("/config.property").openStream());
			DataSource ds = DruidDataSourceFactory.createDataSource(properties);
			query=new QueryRunner(ds);
		}catch (Exception e) {
			e.printStackTrace();
		}
	}
}
